<% present entry do |entry_presenter| %>
  <% if entry_presenter.youtube_embed(url) %>
    <div class="feedbin--embed-wrap"><%= entry_presenter.youtube_embed(url) %></div>
  <% elsif entry_presenter.vimeo_embed(url) %>
    <div class="feedbin--embed-wrap"><%= entry_presenter.vimeo_embed(url) %></div>
  <% elsif entry_presenter.instagram_embed(url) %>
    <div class="feedbin--embed-wrap"><%= entry_presenter.instagram_embed(url) %></div>
  <% elsif page = entry_presenter.saved_page(url.to_s) %>
    <% if content = entry_presenter.page_content_api(page) %>
      <div class="feedbin--article-wrap">
        <header class="feedbin--article-header">
          <%= link_to page.url, target: '_blank', rel: 'noopener noreferrer' do  %>
            <h2><%= page.title || "Untitled" %></h2>
          <% end %>
          <p class="feedbin--article-meta">
            <span class="feedbin--host">
              <%= url.host %>
            </span>
            <br />
            <span class="feedbin--author">
              <% if page.author %>
                by <%= page.author %>
              <% end %>
            </span>
          </p>
        </header>
        <div class="feedbin--article-content">
          <%= content.html_safe %>
        </div>
      </div>
    <% end %>
  <% end %>
<% end %>